package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PrinterSettingsMapper;
import com.ruoyi.system.domain.PrinterSettings;
import com.ruoyi.system.service.IPrinterSettingsService;

/**
 * 打印机设置，用于管理各门店下档口的打印机配置Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class PrinterSettingsServiceImpl implements IPrinterSettingsService
{
    @Autowired
    private PrinterSettingsMapper printerSettingsMapper;

    /**
     * 通过id查询打印机设置
     *
     * @param id 打印机设置，用于管理各门店下档口的打印机配置主键
     * @return 打印机设置，用于管理各门店下档口的打印机配置
     */
    @Override
    public PrinterSettings selectPrinterSettingsById(Long id)
    {
        return printerSettingsMapper.selectPrinterSettingsById(id);
    }

    /**
     * 查询打印机设置列表
     *
     * @param storeName 门店名称
     * @return 打印机设置，用于管理各门店下档口的打印机配置
     */
    @Override
    public List<PrinterSettings> selectPrinterSettingsListByName(String storeName)
    {
        return printerSettingsMapper.selectPrinterSettingsListByName(storeName);
    }

    /**
     * 新增打印机设置列表
     *
     * @param printerSettings 打印机设置，用于管理各门店下档口的打印机配置
     * @return 结果
     */
    @Override
    public int insertPrinterSettings(PrinterSettings printerSettings)
    {
        return printerSettingsMapper.insertPrinterSettings(printerSettings);
    }

    /**
     * 修改打印机设置列表
     *
     * @param printerSettings 打印机设置，用于管理各门店下档口的打印机配置
     * @return 结果
     */
    @Override
    public int updatePrinterSettings(PrinterSettings printerSettings)
    {
        return printerSettingsMapper.updatePrinterSettings(printerSettings);
    }

    /**
     * 批量删除打印机设置列表
     *
     * @param ids 需要删除的打印机设置，用于管理各门店下档口的打印机配置主键
     * @return 结果
     */
    @Override
    public int deletePrinterSettingsByIds(Long[] ids)
    {
        return printerSettingsMapper.deletePrinterSettingsByIds(ids);
    }

    /**
     * 删除打印机设置信息列表
     *
     * @param id 打印机设置，用于管理各门店下档口的打印机配置主键
     * @return 结果
     */
    @Override
    public int deletePrinterSettingsById(Long id)
    {
        return printerSettingsMapper.deletePrinterSettingsById(id);
    }
}
